import 'package:cateapp/generated/json/base/doctor_team_list_entity.dart';

doctorTeamListEntityFromJson(DoctorTeamListEntity data, Map<String, dynamic> json) {
	if (json['code'] != null) {
		data.code = json['code']?.toString();
	}
	if (json['msg'] != null) {
		data.msg = json['msg'];
	}
	if (json['data'] != null) {
		data.data = new List<DoctorTeamListData>();
		(json['data'] as List).forEach((v) {
			data.data.add(new DoctorTeamListData().fromJson(v));
		});
	}
	if (json['timestamp'] != null) {
		data.timestamp = json['timestamp']?.toString();
	}
	return data;
}

Map<String, dynamic> doctorTeamListEntityToJson(DoctorTeamListEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	if (entity.data != null) {
		data['data'] =  entity.data.map((v) => v.toJson()).toList();
	}
	data['timestamp'] = entity.timestamp;
	return data;
}

doctorTeamListDataFromJson(DoctorTeamListData data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	if (json['unitId'] != null) {
		data.unitId = json['unitId']?.toString();
	}
	if (json['unitUUID'] != null) {
		data.unitUUID = json['unitUUID'];
	}
	if (json['unitName'] != null) {
		data.unitName = json['unitName']?.toString();
	}
	if (json['unitAddress'] != null) {
		data.unitAddress = json['unitAddress'];
	}
	if (json['teamName'] != null) {
		data.teamName = json['teamName']?.toString();
	}
	if (json['teamLevelName'] != null) {
		data.teamLevelName = json['teamLevelName']?.toString();
	}
	if (json['doctorUnitName'] != null) {
		data.doctorUnitName = json['doctorUnitName']?.toString();
	}
	return data;
}

Map<String, dynamic> doctorTeamListDataToJson(DoctorTeamListData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['unitId'] = entity.unitId;
	data['unitUUID'] = entity.unitUUID;
	data['unitName'] = entity.unitName;
	data['unitAddress'] = entity.unitAddress;
	data['teamName'] = entity.teamName;
	data['teamLevelName'] = entity.teamLevelName;
	data['doctorUnitName'] = entity.doctorUnitName;
	return data;
}